package com.fa4j.system.account.model;


import com.fa4j.common.base.model.CommonState;
import com.fa4j.common.base.model.ModifyCmd;
import com.fa4j.common.base.model.RegexpConst;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.Pattern;
import jakarta.validation.constraints.Size;
import lombok.Data;

import java.util.Set;

@Data
@Schema(description = "账号编辑参数")
public class AccountModifyCmd extends ModifyCmd<Long> {

    @Size(min = 2, max = 32)
    @Schema(description = "用户昵称")
    private String nickname;

    @Schema(description = "状态")
    private CommonState state;

    @Pattern(regexp = RegexpConst.PHONE_NUMBER, message = "手机号码格式错误")
    @Schema(description = "手机号码")
    private String phone;

    @Email
    @Size(max = 32)
    @Schema(description = "电子邮箱")
    private String email;

    @Schema(description = "头像ID")
    private Long avatarId;

    @Schema(description = "角色编码集合")
    private Set<String> roleCodes;
}
